/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package hotgammon.domain.game.Rules;

import hotgammon.domain.board.Board;
import hotgammon.domain.board.Color;
import hotgammon.domain.board.Location;

/**
 *
 * @author jeppewelling
 */
public class NotLockedLocationMoveOwnChecker implements Rule {

    public boolean isValidMove(Board b, Location from, Location to, int[] movesLeft, Color playerInTurn) {
        if (playerInTurn != b.getColor(to) && b.getCount(to) > 1) {
            return false;
        }
        return true;
    }
    

}
